package com.sysman.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.sysman.mapper.DoctorinfoMapperCustom;
import com.sysman.mapper.DoctorlogininfoMapper;
import com.sysman.mapper.DoctorlogininfoMapperCustom;
import com.sysman.po.DoctorinfoCustom;
import com.sysman.po.Doctorlogininfo;
import com.sysman.po.DoctorlogininfoCustom;
import com.sysman.service.DoctorService;

/** 
* @author  LTT-AH-ZY
* @date 创建时间：2017年8月10日 下午2:43:12 
* @version 1.0 
* @parameter 参数及其意义
* @since 最早使用该方法/类/接口的JDK版本 
* @since  
* @return  
*/

public class DoctorServiceImpl implements DoctorService{

	@Autowired
	private DoctorlogininfoMapperCustom doctorlogininfoMapperCustom;
	@Autowired
	private DoctorlogininfoMapper doctorlogininfoMapper;
	@Autowired
	private DoctorinfoMapperCustom doctorinfoMapperCustom;
	@Override
	public List<DoctorlogininfoCustom> InitDoctorlogininfoList(DoctorlogininfoCustom doctorlogininfoCustom)
			throws Exception {
		// Init doctorlogininfoList
		return doctorlogininfoMapperCustom.InitDoctorlogininfoList(doctorlogininfoCustom);
	}
	@Override
	public List<DoctorlogininfoCustom> InitDoctorlogininfoExamineList(DoctorlogininfoCustom doctorlogininfoCustom)
			throws Exception {
		// Init doctorlogininfoExamineList
		return doctorlogininfoMapperCustom.InitDoctorlogininfoExamineList(doctorlogininfoCustom);
	}
	@Override
	public int UpdateDoctorlogininfoType(Integer docloginid,DoctorlogininfoCustom doctorlogininfoCustom) throws Exception {
		// uodate tabel-doctorlogininfo by docloginid
		doctorlogininfoCustom.setDocloginid(docloginid);
		return doctorlogininfoMapper.updateByPrimaryKeySelective(doctorlogininfoCustom);
	}
	@Override
	public Doctorlogininfo findDoctorlogininfoDetails(Integer docloginid) throws Exception {
		// select * from doctorlogininfo by docloginid
		return doctorlogininfoMapper.selectByPrimaryKey(docloginid);
	}
	@Override
	public DoctorinfoCustom findDoctorinfoDetails(DoctorinfoCustom doctorinfoCustom) throws Exception {
		// select * from doctorinfo by doctorinfoCustom.docloginid
		return doctorinfoMapperCustom.findDoctorinfoDetails(doctorinfoCustom);
	}
}
